.class public Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;
.super Ljava/lang/Object;
.source "MeasureSelectedGui.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/gui/Gui;


# instance fields
.field private actionButtonsBar:Landroid/view/View;

.field private handler:Landroid/os/Handler;

.field private infoCard:Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

.field private rootView:Landroid/widget/FrameLayout;

.field private threadIsNeeded:Z

.field private track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 28
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x1

    .line 39
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->threadIsNeeded:Z

    return-void
.end method

.method private addInfoCard(Landroid/content/Context;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 4

    const-string v0, "layout_inflater"

    .line 107
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 108
    iget-object v1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->rootView:Landroid/widget/FrameLayout;

    const v2, 0x7f0c0077

    invoke-virtual {v0, v2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 113
    invoke-static {p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getScreenOrientation(Landroid/content/Context;)I

    move-result v1

    const/4 v2, -0x2

    const/4 v3, 0x2

    if-ne v1, v3, :cond_0

    .line 114
    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v1, v2, v2}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    goto :goto_0

    .line 116
    :cond_0
    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v3, -0x1

    invoke-direct {v1, v3, v2}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    .line 118
    :goto_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2, p1}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result v2

    const/4 v3, 0x0

    invoke-virtual {v1, v3, v2, v3, v3}, Landroid/widget/FrameLayout$LayoutParams;->setMargins(IIII)V

    const v2, 0x7f09016f

    .line 119
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    .line 120
    invoke-virtual {v3, v1}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 123
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    const/16 v2, 0xc8

    invoke-static {p1, v1, v2}, Llt/noframe/gpsfarmguide/utils/Animations;->topDownTrans(Landroid/content/Context;Landroid/view/View;I)V

    .line 125
    new-instance v1, Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

    invoke-direct {v1, p1, v0, p2}, Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;-><init>(Landroid/content/Context;Landroid/view/View;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    iput-object v1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->infoCard:Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

    return-void
.end method

.method private addNavigation(Landroid/content/Context;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 3

    const-string v0, "layout_inflater"

    .line 130
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 131
    iget-object v1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->rootView:Landroid/widget/FrameLayout;

    const v2, 0x7f0c002d

    invoke-virtual {v0, v2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 132
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    new-instance v2, Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;

    invoke-direct {v2, p1, v0, p2}, Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;-><init>(Landroid/content/Context;Landroid/view/View;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    invoke-virtual {v1, v2}, Llt/noframe/gpsfarmguide/Data;->setNaviOptions(Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;)V

    .line 135
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    const p2, 0x7f070151

    invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result p1

    float-to-int p1, p1

    const/4 p2, 0x0

    .line 136
    invoke-direct {p0, p1, p2}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->zoomControls(IZ)V

    .line 137
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNaviOptions()Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;->setView()V

    return-void
.end method

.method private invalidateMapPaddings()V
    .locals 9

    .line 207
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    .line 208
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f07014c

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    .line 210
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v0, v2}, Llt/noframe/gpsfarmguide/Data;->getToolbarheight(Landroid/content/Context;)I

    move-result v2

    .line 212
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getScreenOrientation(Landroid/content/Context;)I

    move-result v3

    const/4 v4, 0x1

    const/4 v5, 0x0

    const/4 v6, 0x2

    if-ne v3, v6, :cond_0

    .line 213
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    invoke-virtual {v3, v5, v2, v5, v1}, Lcom/google/android/gms/maps/GoogleMap;->setPadding(IIII)V

    .line 215
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v2

    const-wide/high16 v5, 0x405e000000000000L    # 120.0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v5, v6, v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v3

    invoke-static {v1, v2, v3, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 216
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v0

    const-wide v2, 0x4050400000000000L    # 65.0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-static {v2, v3, v5}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v2

    invoke-static {v1, v0, v2, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    goto :goto_0

    .line 219
    :cond_0
    iget-object v3, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->infoCard:Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;->getView()Landroid/view/View;

    move-result-object v3

    invoke-static {v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getViewHeight(Landroid/view/View;)I

    .line 221
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v6

    const-wide v7, 0x4055400000000000L    # 85.0

    invoke-static {v7, v8, v6}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v6

    add-int/2addr v2, v6

    invoke-virtual {v3, v5, v2, v5, v1}, Lcom/google/android/gms/maps/GoogleMap;->setPadding(IIII)V

    .line 222
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v2

    const-wide v5, 0x4061800000000000L    # 140.0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v5, v6, v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v3

    invoke-static {v1, v2, v3, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 223
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v7, v8, v2}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v2

    invoke-static {v1, v0, v2, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    :goto_0
    return-void
.end method

.method private requestOrientationIfScreenTooSmall(Landroid/content/Context;)V
    .locals 5

    .line 160
    invoke-static {p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getScreenOrientation(Landroid/content/Context;)I

    move-result v0

    .line 161
    invoke-static {p1}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->getScreenHeight(Landroid/content/Context;)I

    move-result v1

    .line 162
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object p1

    iget p1, p1, Landroid/util/DisplayMetrics;->density:F

    float-to-int p1, p1

    const/4 v2, 0x1

    if-nez p1, :cond_0

    const/4 p1, 0x1

    .line 164
    :cond_0
    div-int/2addr v1, p1

    .line 165
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object p1

    const/4 v3, 0x0

    invoke-virtual {p1, v3}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 166
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p1

    invoke-virtual {p1}, Lcom/google/android/gms/maps/GoogleMap;->getUiSettings()Lcom/google/android/gms/maps/UiSettings;

    move-result-object p1

    const/16 v4, 0x2bc

    if-ge v1, v4, :cond_2

    const/4 v1, 0x2

    if-eq v0, v1, :cond_1

    goto :goto_0

    :cond_1
    const/4 v2, 0x0

    :cond_2
    :goto_0
    invoke-virtual {p1, v2}, Lcom/google/android/gms/maps/UiSettings;->setZoomControlsEnabled(Z)V

    return-void
.end method

.method private zoomControls(IZ)V
    .locals 6

    .line 180
    :try_start_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 181
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f07014c

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    .line 182
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getMapFragment()Lcom/google/android/gms/maps/SupportMapFragment;

    move-result-object v2

    .line 183
    invoke-virtual {v2}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View;

    move-result-object v2

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    if-eqz v2, :cond_1

    .line 184
    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v4

    instance-of v4, v4, Landroid/widget/RelativeLayout$LayoutParams;

    if-eqz v4, :cond_1

    .line 185
    invoke-virtual {v2}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/widget/RelativeLayout$LayoutParams;

    const/16 v4, 0x9

    const/4 v5, 0x0

    .line 186
    invoke-virtual {v2, v4, v5}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V

    const/16 v4, 0xb

    .line 187
    invoke-virtual {v2, v4}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/16 v4, 0xc

    .line 188
    invoke-virtual {v2, v4}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/high16 v4, 0x41200000    # 10.0f

    .line 189
    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 190
    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 189
    invoke-static {v3, v4, v0}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v0

    float-to-int v0, v0

    if-eqz p2, :cond_0

    const/4 v1, 0x0

    :cond_0
    mul-int/lit8 p2, v0, 0x3

    add-int/2addr p2, p1

    sub-int/2addr p2, v1

    .line 194
    invoke-virtual {v2, v0, v0, v0, p2}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 197
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1
    :goto_0
    return-void
.end method


# virtual methods
.method public clearGui(I)V
    .locals 3

    .line 77
    iget-object v0, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->removePath()V

    .line 79
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getDisplayTrackInMap()Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    const/4 v0, 0x4

    if-eq p1, v0, :cond_1

    .line 80
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getDisplayTrackInMap()Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;->removePolygons()V

    .line 81
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/Data;->setDisplayTrackInMap(Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;)V

    .line 85
    :cond_1
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNavigationLines()Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    move-result-object p1

    if-eqz p1, :cond_2

    .line 86
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNavigationLines()Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;->removeNaviLines()V

    .line 87
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/Data;->setNavigationLines(Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;)V

    .line 91
    :cond_2
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->rootView:Landroid/widget/FrameLayout;

    iget-object v0, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->actionButtonsBar:Landroid/view/View;

    invoke-virtual {p1, v0}, Landroid/widget/FrameLayout;->removeView(Landroid/view/View;)V

    .line 92
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->infoCard:Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;->remove()V

    .line 93
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNaviOptions()Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;

    move-result-object p1

    if-eqz p1, :cond_3

    .line 94
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNaviOptions()Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;->remove()V

    .line 95
    :cond_3
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/Data;->setNaviOptions(Llt/noframe/gpsfarmguide/widgets/bottom_start/BottomStartNavigationBar;)V

    const/4 p1, 0x1

    const/4 v0, 0x0

    .line 96
    invoke-direct {p0, v0, p1}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->zoomControls(IZ)V

    .line 98
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v2

    if-eqz v2, :cond_4

    .line 99
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2, v1}, Llt/noframe/gpsfarmguide/Data;->setCurrent_measuring(Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 100
    :cond_4
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v1

    sget-object v2, Llt/noframe/gpsfarmguide/MapClick;->freeModeClick:Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;

    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/GoogleMap;->setOnMapClickListener(Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;)V

    .line 102
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v1

    invoke-virtual {v1}, Lcom/google/android/gms/maps/GoogleMap;->getUiSettings()Lcom/google/android/gms/maps/UiSettings;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/google/android/gms/maps/UiSettings;->setZoomControlsEnabled(Z)V

    .line 103
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object p1

    invoke-virtual {p1, v0}, Landroid/widget/ImageButton;->setVisibility(I)V

    return-void
.end method

.method public clearGuiWithMeasure()V
    .locals 2

    const/4 v0, 0x0

    .line 66
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->threadIsNeeded:Z

    .line 67
    iget-object v1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    if-eqz v1, :cond_0

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->removePath()V

    .line 69
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    .line 70
    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->remove()V

    .line 71
    invoke-virtual {p0, v0}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->clearGui(I)V

    return-void
.end method

.method public getType()I
    .locals 1

    const/4 v0, 0x3

    return v0
.end method

.method public onOrientationChanged(Z)V
    .locals 1

    .line 150
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 151
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->infoCard:Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/widgets/MeasureInfoCard;->remove()V

    .line 152
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-direct {p0, p1, v0}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->addInfoCard(Landroid/content/Context;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 153
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->invalidateMapPaddings()V

    .line 154
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->requestOrientationIfScreenTooSmall(Landroid/content/Context;)V

    :cond_0
    return-void
.end method

.method public setGui(Landroid/content/Context;Landroid/widget/FrameLayout;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V
    .locals 3

    .line 44
    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->requestOrientationIfScreenTooSmall(Landroid/content/Context;)V

    const-string v0, "layout_inflater"

    .line 46
    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    const v1, 0x7f0c006b

    const/4 v2, 0x0

    .line 47
    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 48
    iput-object p2, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->rootView:Landroid/widget/FrameLayout;

    .line 49
    iput-object v0, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->actionButtonsBar:Landroid/view/View;

    .line 50
    invoke-virtual {p2, v0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 53
    invoke-direct {p0, p1, p3}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->addInfoCard(Landroid/content/Context;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 56
    invoke-direct {p0, p1, p3}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->addNavigation(Landroid/content/Context;Llt/noframe/gpsfarmguide/models/MeasuringModel;)V

    .line 59
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->invalidateMapPaddings()V

    .line 60
    new-instance p1, Landroid/os/Handler;

    invoke-direct {p1}, Landroid/os/Handler;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/MeasureSelectedGui;->handler:Landroid/os/Handler;

    return-void
.end method
